package ExtendsStudy.demo_10;

public class Test {
    public static void main(String[] args) {
        useInterA(System.out::println,"Ikun");
        System.out.println(useInterB(Test::new));
        System.out.println(useInterC(Math::max, 1, 2));
    }

    public static void useInterA(InterA interA, String s){
        interA.print(s);
    }
    public static Test useInterB(InterB interB){
        return interB.getTest();
    }
    public static int useInterC(InterC interC,int a, int b){
        return  interC.getMax(a,b);
    }
}
interface InterA{
    void print(String s);
}
interface InterB{
    Test getTest();
}
interface InterC{
    int getMax(int a,int b);
}
